package com.study.design.pattern.pattern.structural.decorator;

/**
 * @Author: gongsl
 * @Date: 2025-03-09 15:56
 * @description: 具体装饰类-香肠装饰类
 */
public class SausageDecorator extends AbstractDecorator {
    public SausageDecorator(AbsBatterCake absBatterCake) {
        super(absBatterCake);
    }

    @Override
    protected String getDesc() {
        return super.getDesc() + " 加一根香肠";
    }

    /**
     * 价格，每根香肠2元
     */
    @Override
    protected int cost() {
        return super.cost() + 2;
    }
}
